# include <bits/stdc++.h>
# define MAXN 2000023

using namespace std;

int A[MAXN], n;

void msort(int *l, int *r) { 
    static int p[MAXN];
    if(l == r) return;
    int *mid = l + ((r - l) >> 1);
    int *i = l, *j = mid + 1;
    int *k = p;
    msort(l, mid);
    msort(mid + 1, r);
    while(i <= mid && j <= r) { 
        if(*i < *j) *(k++) = *(i++);
        else *(k++) = *(j++);
    }
    while(i <= mid) *(k++) = *(i++);
    while(j <= r)  *(k++) = *(j++);
    k = p;
    while(l <= r) *(l++) = *(k++);
}


int main() { 
    //freopen("sorttest.in", "r", stdin);
    //freopen("sorttest.out", "w", stdout);
    scanf("%d", &n);
    for(int i = 1; i <= n; i++) scanf("%d", &A[i]);
    msort(A + 1, A + n);
    for(int i = 1; i <= n; i++) printf("%d ", A[i]);
}
